package com.springcloud.hystrix;

import com.springcloud.model.User;
import com.springcloud.service.ProviderService;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;

/**
 * 自定义声明式服务消费接口的熔断器类,这个类必须实现某个声明式服务消费接口,用于为这个接口提供服务熔断
 * 这个类必须定义到Spring的应用上下文中,最终由Spring完成调用
 */
@Component
public class MyFallback implements ProviderService {
    @Override
    public String test() {
        return "test方法触发了服务熔断";
    }

    @Override
    public String getUser01() {
        return null;
    }

    @Override
    public Map getUser02() {
        return null;
    }

    @Override
    public User getUser03() {
        return null;
    }

    @Override
    public List getUserList01() {
        return null;
    }

    @Override
    public List<User> getUserList02() {
        return null;
    }

    @Override
    public User params01(String sname, Integer age) {
        return null;
    }

    @Override
    public User params02(String sname, Integer age) {
        return null;
    }

    @Override
    public User paramsObj(User user) {
        return null;
    }

    @Override
    public List<User> paramsList(List<User> list) {
        return null;
    }

    @Override
    public User paramsJson(String paramsJson) {
        return null;
    }
}
